package com.trivera.guice;

import com.google.inject.*;

/**
* <p>
 * This component and its source code representation are copyright protected
 * and proprietary to Trivera Technologies, Inc., Worldwide
 *
 * This component and source code may be used for instructional and
 * evaluation purposes only. No part of this component or its source code
 * may be sold, transferred, or publicly posted, nor may it be used in a
 * commercial or production environment, without the express written consent
 * of the Trivera Technologies, Inc.
 *
 * Copyright (c) 2013 Trivera Technologies, Inc.
 * http://www.triveratech.com   http://www.triveragroup.com
 * </p>
 * @author The Trivera Tech Team.
 */

public class AutomatedTellerMachineImpl implements AutomatedTellerMachine {

	ATMTransport transport;
	
	@Inject
	public AutomatedTellerMachineImpl(ATMTransport t)
	{
		setTransport(t);
	}
	
	//@Inject
	public void setTransport(ATMTransport t)
	{
		transport = t;
	}
	@Override
	public ATMTransport getTransport()
	{
		return transport;
	}
	
	
	@Override
	public void deposit(double d) {
	    System.out.println("deposit called");
	    byte[] datapacket = new byte[10];
	    transport.communicateWithBank(datapacket);
	}

	@Override
	public void withdraw(double d) {
	    System.out.println("withdraw called");
	    byte[] datapacket = new byte[10];
	}

	

}
